package neu.gprs.service;

import java.util.List;

import neu.gprs.dao.PosStatusDao;
import neu.gprs.domain.LookOverPosStatusDomain;
import neu.gprs.dto.LookOverPosStatusDto;
import neu.gprs.dto.UserLineDto;

public class PosStatusServiceImpl implements PosStatusService {

    /**
     * POS机状态Dao
     */
    private PosStatusDao dao;

    public void setDao(PosStatusDao dao) {
        this.dao = dao;
    }

    @Override
    public List<LookOverPosStatusDomain> getPosStatus(LookOverPosStatusDto conditionDto) {
        return dao.getPosStatus(conditionDto);
    }

    @Override
    public void update(LookOverPosStatusDto dto) {
        dao.update(dto);
    }

    @Override
    public boolean isLogin(String userName, String password) {
        UserLineDto userDto = dao.isLogin(userName, password);
        if (userDto == null) {
            return false;
        } else {
            return true;
        }
    }
}
